package boerse.main.StockPriceProvider;

import java.util.Timer;
import java.util.TimerTask;


public class ConstStockPriceProvider extends StockPriceProvider {

	
	
	public ConstStockPriceProvider() {
		super();
	}

	@Override
	protected void updateShareRates() {
		return;
		
	}

	@Override
	protected void updateShareRate(String shareName) {
		return;		
	}
	
	@Override
	public void startUpdate() {
		MyTimer myTimer = new MyTimer();
		myTimer.startTiming();
	}
	
	class MyTimer {
		private void startTiming() {
			Timer timer = new Timer();
			 timer.scheduleAtFixedRate(new TimerTask() {
				public void run() {
					ConstStockPriceProvider.this.updateShareRates();
				}
			}
			, 1000, 2000);			
		}
	}
	
}
